typecheck